proc disable {nick handle host chan otbn1} {
global home botnick bcast
if {$otbn1 == ""} {
  putquick "NOTICE $nick :\0034ERROR - Invaild Syntax - Should Be - (/msg) $botnick disable <#channel> <user>"
  return 0
  }
if {[onchan $otbn1 $chan]} {
  set hand2 [nick2hand $otbn1 $chan]
  } else {
  set hand2 $otbn1
  }
if {[matchattr $hand2 D]} {
  putquick "NOTICE $nick :\0034ERROR - User Is Currently Disabled - The user '\002$hand2\002' is currently disabled."
  return 0
  }
if {[string tolower $hand2] == [string tolower $handle]} {
  putquick "NOTICE $nick :\0034ERROR - Unable To Disable Commanding User - Get another user to do so."
  return 0
  }
if {[string tolower $hand2] == [string tolower $botnick]} {
  putquick "NOTICE $nick :\0034ERROR - Unable To Disable User - The user '\002$hand2\002' is me!!!"
if {$bcast == "1"} {
  putquick "PRIVMSG $home :\002$nick\002 ($host) tried to make me disable myself."
  }
  return 0
  }
if {![validuser $hand2]} {
  putquick "NOTICE $nick :\0034ERROR - Unknown User - Could not find '\002$hand2\002' in my user partition."
  return 0
  }	
if {![checkaccess $handle $chan $hand2]} {
  putquick "NOTICE $nick :Unable To Execute Command - Permission Denied."
  putquick "NOTICE $otbn1 :\002$nick\002 ($host) tried to disable your user account."
  return 0
  }
  putlog "!$nick ($host)! disable $hand2"
  putquick "NOTICE $nick :Sucessfully disable'd user account '\002$hand2\002'" 
if {$bcast == "1"} {
  putquick "PRIVMSG $home :\002$nick\002 ($host) requested me to disable the user account '\002$hand2\002'"
  }
  set permissions [chattr $hand2] 
  setuser $hand2 XTRA "DISABLED-PERMISSIONS" +$permissions 
  chattr $hand2 -$permissions
  chattr $hand2 +D
  save
  set console [hand2idx $hand2]
if {$console != "-1"} {
  killdcc $console
  }
  return 0
  }









